FROM openjdk:11-jdk-slim
LABEL maintainer="1710518450@qq.com"
WORKDIR /app

COPY ./sentinel-dashboard-1.8.7.jar /app/sentinel-dashboard.jar
ENV SENTINEL_DASHBOARD_SERVER_PORT=8080
ENV SENTINEL_DASHBOARD_AUTH_USERNAME=admin
ENV SENTINEL_DASHBOARD_AUTH_PASSWORD=changeme

EXPOSE ${SENTINEL_DASHBOARD_SERVER_PORT}

CMD ["java", "-Xmx512m", \
     "-Dserver.port=${SENTINEL_DASHBOARD_SERVER_PORT}", \
     "-Dauth.username=${SENTINEL_DASHBOARD_AUTH_USERNAME}", \
     "-Dauth.password=${SENTINEL_DASHBOARD_AUTH_PASSWORD}", \
     "-jar", "sentinel-dashboard.jar"]
